const Mock = require('mockjs')

const data = Mock.mock({
  dataStatistics: [{
    sysRoleCount: 102,
    sysRoleTodayCount: 12,
    grantUserRoleCount: 305,
    adminUserCount: 16,
    adminUserTodayCount: 2
  }],
  keys: ['2023-07-26', '2023-07-27', '2023-07-28', '2023-07-29', '2023-07-30', '2023-07-31', '2023-08-01'],
  values: [12, 32, 5, 16, 2, 5, 17]

})
module.exports = [
  // 数据统计
  {
    url: '/permission/overview/dataStatistics',
    type: 'get',
    response: (_) => {
      return {
        code: '00000',
        success: true,
        message: '成功',
        data: data.dataStatistics[0]
      }
    }
  },
  // 折线图
  {
    url: '/permission/overview/lineChart',
    type: 'get',
    response: (config) => {
      return {
        code: '00000',
        success: true,
        message: '成功',
        data: {
          keys: data.keys,
          values: data.values
        }
      }
    }
  }
]
